<template>
	<view>
		<scroll-list ref="list" :option="option" @load="load" @refresh="refresh">
			<view class="w90">
				<view class="p_t_20 bb pb15" v-for="(item,index) in list" :key="index">
					<view class="">
						<view class="f b flex-align-center">
							<image style="width: 68rpx;height: 68rpx;border-radius: 200rpx;" :src="item.user_img" mode=""></image>
							<view class="vw80 f b">
								<text class="hui fs24 ml10">{{item.user_name}}</text>
								<text class="hui fs24">{{item.create_time}}</text>
							</view>
						</view>
						<view class="vw80" style="margin-left:90rpx;">
							<text class="fs24 hui">{{item.content}}</text>
						</view>
						<view class="vw80 fs20 p_t_25" style="margin-left:90rpx;">
							<text class="hui">课程：{{item.course_name}}</text>
						</view>
					</view>
				</view>
			</view>
		</scroll-list>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id: "",
				list:[],
				page:0,
			}
		},
		onLoad(e) {
			// 动态导航条文字
			uni.setNavigationBarTitle({
				title: '全部评价'
			})
			this.id = e.id

		},
		methods: {
			// 加载数据
			load(paging) {
				var that = this
				that.page = that.page + 1
				setTimeout(() => {
					var json = {
						page: that.page,
						id:that.id
					}
					that.$http.post(that.$config.UrlPostallPj, json).then((res) => {
						if (res.status == 1) {
							var list = res.data.list
							if(list){
								var totalDemo = that.list.concat(list);
								that.list = JSON.parse(JSON.stringify(totalDemo))
								that.$refs.list.loadSuccess({ list: that.list, total: res.data.count });
							}
						}
					})
					
				}, that.$u.random(100, 1000));
			},
		}
	}
</script>

<style>
	.cover {
			position: fixed;
			top: 0;
			width: 100%;
			height: 100vh;
			background: #000000;
			opacity: 0.6;
			z-index: 10;
		} 
	.warps {
		/* height:180vh; */
		overflow: hidden;
		background-color: #FFFFFF;
	}
	.Details-but{
		margin-top: 116rpx;
	}
	.Details-but>button{
		width: 686rpx;
		height: 60rpx;
		line-height:60rpx;
		opacity: 1;
		background: #1f73f2;
		border-radius: 30rpx;
		font-size: 24rpx;
		color:#fff;
	}
	.Details-huod{
		width: 432rpx;
		height: 556rpx;
		opacity: 1;
		background: #ffffff;
		position:absolute;
		top:300rpx;
		left:160rpx;
		z-index:11;
	}
	.Details-guan{
		position:absolute;
		top:950rpx;
		left:340rpx;
		z-index:11;
	}
</style>
